<?php


require_once('quail/quail.php');

$settings->add(new admin_setting_configselect('filter_accessibility_guideline',
				   get_string('accessibilityguideline','filter_accessibility'),
				   get_string('accessibilityguidelinedescription','filter_accessibility'),
				   'wcag2aaa',
				   array(
					'section508' => 'Section 508',
					'wcag1a' => 'WCAG 1.0 A',
					'wcag1aa' => 'WCAG 1.0 AA',
					'wcag1aaa' => 'WCAG 1.0 AAA',
					'wcag2a' => 'WCAG 2.0 A',
					'wcag2aa' => 'WCAG 2.0 AA',
					'wcag2aaa' => 'WCAG 2.0 AAA',
					
				)));

$settings->add(new admin_setting_configselect('filter_accessibility_display_level',
					get_string('accessibilitydisplaylevel', 'filter_accessibility'),
					get_string('accessibilitydisplayleveldescription', 'filter_accessibility'),
					1,
					array(1 => 'Severe',
						  2 => 'Moderate', 
						  3 => 'Suggestion',
				)));
global $CFG;
require_once('quail/guidelines/'. $CFG->filter_accessibility_guideline .'.php');
$false = false;
$classname = ucfirst($CFG->filter_accessibility_guideline) .'Guideline';
$guideline = new $classname($false, $false, $false);
foreach($guideline->tests as $test) {
	$translation = $guideline->getTranslation($test);
	$settings->add(new admin_setting_configtext('filter_accessibility_test_title_'. $test,
					get_string('testtitle', 'filter_accessibility') .' '. $test,
					get_string('testttiledescription', 'filter_accessibility'),
					$translation['title']
				));

	$settings->add(new admin_setting_configtextarea('filter_accessibility_test_body_'. $test,
					get_string('testbody', 'filter_accessibility') .' '. $test,
					get_string('testbodydescription', 'filter_accessibility'),
					$translation['description']
				));
}